//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//

//
#include "VmDirectMapControlBlockGPGPU.h"

#include "Config.h"
#include "Generator.h"
#include "Register.h"

/*!
  \file VmDirectMapControlBlockGPGPU.cc
  \brief Code to configure GPGPU direct mapping control blocks.
*/

using namespace std;

namespace Green {

  VmDirectMapControlBlockGPGPU::VmDirectMapControlBlockGPGPU(EPrivilegeLevelType elType, EMemBankType memType)
   : VmDirectMapControlBlock(elType, memType)
  {

  }

  void VmDirectMapControlBlockGPGPU::Setup(Generator* pGen)
  {
    VmDirectMapControlBlock::Setup(pGen);
  }

  void VmDirectMapControlBlockGPGPU::Initialize()
  {
    VmDirectMapControlBlock::Initialize();

    VmDirectMapControlBlock::InitializeContext(mpGenerator);
  }

  uint64 VmDirectMapControlBlockGPGPU::GetMaxPhysicalAddress() const
  {
    return Config::Instance()->LimitValue(ELimitType::PhysicalAddressLimit);
  }

}
